The present invention claims foreign priority to Taiwan patent application no. 92129500, filed on Oct. 24, 2003, the contents of which is incorporated herein by reference.
1. Field of the Invention
The invention relates generally to a method for detecting sub-pixel motion associated with an optical navigation device, and more particularly to a method for calculating and detecting the sub-pixel motion by calculating displacement of reference pixels within two image frames.
2. Background of the Invention
An optical navigation device, such as optical mouse, is known for its superiority over conventional mice with rollers. A typical optical navigation device includes an array of sensors that moves over a surface to capture images of the surface reflected on the sensors at different times. The captured images are pixel array data that are stored in a memory in a digital form. The optical navigation device further includes a processor for calculating a displacement between two adjacent images. After the displacement of the adjacent images is calculated, a navigation signal in the form of positional coordinates can be determined.
One of the methods used to calculate the displacement of the captured images is to detect sub-pixel motions of the captured images and determine the shifted distance of the sub-pixels. The conventional sub-pixel motion detection method takes part of a reference image frame as a search window and correlates the search window with a sample image frame (current image frame) to obtain a plurality of correlation values. The correlation values are then interpolated into a quadratic surface with an absolute minimum value. By determining the absolute minimum value of the quadratic surface, a displacement of the optical navigation device is then calculated. U.S. Pat. No. 5,729,008, entitled “Method and device for tracking relative movement by correlating signals from an array of photoelements,” discloses this technology.
FIG. 1 of the present application illustrates an exemplary operational view of the above-mentioned sub-pixel motion detecting method used in a conventional optical navigation device. In FIG. 1, image frame 11 is a reference image frame with an image of T-shaped inherent structure feature, and image frame 12 is a sample image that is captured at a later time t, which is displaced with respect to reference frame 11 but shows substantially the same T-shaped inherent feature. To detect the displacement of sample frame 12 from reference frame 11, image frame 13 that includes the image of the T-shaped inherent structure feature is selected from reference frame 11 as a search window. Search window 13 is then used to compare with sample frame 12 in different directions.
Search window 13 is allowed to move to up, down, right, and left one pixel (to simplify the explanation, a full-pixel move is assumed). Element 15 of FIG. 1 represents a sequential shifting chart of search window 13 into its nearest eight neighboring pixels. For example, step “0” means that search window 13 does not shift, step “1” represents that search window 13 has shifted to the left, step “2” shows a diagonal move upward and to the left, step “3” shows an upward move, etc. Based on sequential shifting chart 15, search window 13 is correlated with sample frame 12, as shown in position frames 140 to 148 of FIG. 1. The results of correlation are also shown in FIG. 2 as nine correlation result values C0 to C8. As shown, the correlation position frame 140 designated by position 0 does not have a shift so that the result is merely a combination of search window 13 and sample frame 12. In this manner, position frame 144 designated by position 4 has a minimum number of shaded pixels, which means that position frame 144 has highest correlation with sample frame 12. By finding this position frame with highest correlation, it is concluded that sample frame 12 has a diagonal move to upward and to the right. That is, the optical navigation device has moved upwardly and rightwardly during a time period Δt.
The above-mentioned correlation results, after an interpolation process, can be represented in a bowl-shaped surface having a localized minimum. The bowl-shaped surface is illustrated in FIG. 3. By calculating the minimum of the bowl-shaped surface, the most correlative point may be found as the displacement.
The above described method, however, fails to provide more exact motion vector estimation because the method estimates vector motions by calculating the displacement of the pixels, rather than that of the sub-pixels. Furthermore, this method correlates a search window with the whole image frame and the search window is smaller in size than a whole image frame. Therefore, when the displacement of the optical navigation device is large enough so that the reference image frame is out of the range of the search window, the method cannot judge the moving track of the optical navigation device.